package cn.ssm.biz.impl;

import java.util.List;








import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import cn.ssm.biz.BanZhuRenBiz;
import cn.ssm.biz.CoursesBiz;
import cn.ssm.dao.BanZhuRenMapper;
import cn.ssm.dao.CoursesMapper;
import cn.ssm.pojo.BanZhuRen;
import cn.ssm.pojo.Courses;
import cn.ssm.pojo.Pager;
import cn.ssm.query.CoursesQuery;


@Service("coursesBizImpl")
public class CoursesBizImpl  implements CoursesBiz{
	@Autowired
	@Qualifier("coursesMapper")
	
	private CoursesMapper coursesMapper;
	

	public CoursesMapper getCoursesMapper() {
		return coursesMapper;
	}



	public void setCoursesMapper(CoursesMapper coursesMapper) {
		this.coursesMapper = coursesMapper;
	}



	@Override
	public List<Courses> selCourseInfo() {
		// TODO Auto-generated method stub
		return coursesMapper.selCourseInfo();
	}

	

	@Override
	public int selCourseCount() {
		// TODO Auto-generated method stub
		return coursesMapper.selCourseCount();
	}

	@Override
	public List<Courses> selCourseInfoById(Integer id) {
		// TODO Auto-generated method stub
		return coursesMapper.selCourseInfoById(id);
	}

	@Override
	public int delCoueseById(Integer id) {
		// TODO Auto-generated method stub
		return coursesMapper.delCoueseById(id);
	}

	@Override
	public int updateCourseById(Courses course) {
		// TODO Auto-generated method stub
		return coursesMapper.updateCourseById(course);
	}

	@Override
	public int insertCourse(Courses course) {
		// TODO Auto-generated method stub
		return coursesMapper.insertCourse(course);
	}

	
	@Override
	public  CoursesQuery selCourseById(Integer id) {
		// TODO Auto-generated method stub
		return coursesMapper.selCourseById(id);
	}

	@Override
	public List<CoursesQuery> selCoursesQueryInfo(Pager pager) {
		// TODO Auto-generated method stub
		int form =(pager.getCurrentPage()-1)*(pager.getRowPerPage());
		return coursesMapper.selCoursesQueryInfo(form, pager.getRowPerPage());
	}


	/**
	 * 根据班级id查询
	 */
	@Override
	public CoursesQuery selCourseByClassId(Integer id) {
		// TODO Auto-generated method stub
		return coursesMapper.selCourseByClassId(id);
	}



}
